discrete math gcds proof